﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BUL;
namespace Presentation
{
    public partial class frmNotification : Form
    {
        private ProductBUL BO;
        public frmNotification()
        {
            InitializeComponent();
            BO = new ProductBUL();
        }

        private void frmNotification_Load(object sender, EventArgs e)
        {
            dgvOOD.DataSource = BO.LoadOutOfDate();
            dgvOOQ.DataSource = BO.LoadOutOfQuantity();
        }

        private void frmNotification_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult rs = MessageBox.Show("Are you really want to exist?", "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (rs == DialogResult.OK)
            {
                frmMain main = new frmMain();
                this.Hide();
                main.Show();
            }
            else
            {
                e.Cancel = true;
            }
        }
    }
}
